class Solution
{
public:
    bool isGoodArray(vector<int> &nums)
    {
        int _gcd = nums[0];
        for (auto &num : nums)
        {
            _gcd = gcd(_gcd, num);
            if (_gcd == 1)
            {
                return true;
            }
        }
        return false;
    }
};